package com.roger.cmdkit.base;

import com.roger.cmdkit.cases.BillAnalysis;
import com.roger.cmdkit.cases.BodyMassIndex;
import com.roger.cmdkit.cases.BugAnalysis;
import com.roger.cmdkit.cases.DockVoice;
import com.roger.cmdkit.cases.Download;
import com.roger.cmdkit.cases.FileEnDecrypt;
import com.roger.cmdkit.cases.TestCmd;
import com.roger.cmdkit.cases.VerifyCode;
import com.roger.cmdkit.info.Error;
import com.roger.cmdkit.info.Help;
import com.roger.cmdkit.info.Version;

public class CmdSet {
    public static CmdBase builder(String cmdRes) {
        CmdBase cmd;
        switch (cmdRes){
            case "-help":
                cmd=new Help();
                break;
            case "-version":
                cmd=new Version();
                break;
            case "-bill":
                cmd=new BillAnalysis();
                break;
            case "-dock":
                cmd=new DockVoice();
                break;
            case "-bug":  case "-path":  case "-today":
                cmd=new BugAnalysis();
                break;
            case "-c":
                cmd=new VerifyCode();
                break;
            case "-d":
                cmd=new Download();
                break;
            case "-h": case "-w":
                cmd=new BodyMassIndex();
                break;
            case "-E": case "-D":
                cmd=new FileEnDecrypt();
                break;
            case "--test-cmd":
                cmd=new TestCmd();
                break;
            default:
                cmd=new Error();
                break;
        }
        return cmd;
    }

}
